Update Account Status
'UpdateAccountStatus' API enables to change the status of an account
Bank or financial institution can update account status with any one of the valid statuses depending on the requirement. On providing account number and the required status to be updated as request, the account status is updated.
Method: POST
{{URL}}/jsonrpc
Headers
Name | Value |
---|---|
Content-Type | application/json |
Example
Payload Parameters
Parameter | Description |
---|---|
method Mandatory | String API method that is being called to update account status through account service Constant value: "AccountService.UpdateAccountStatus" |
id Mandatory | String Unique ID of API request Sample value: "1" |
params Mandatory | Object |
api Mandatory | Object |
signature Mandatory | String Signature for request validation Sample value: "signature" |
keyId Mandatory | String API key used for request authentication Sample value: "ApplicationKeyId" |
credential Mandatory | String API credential provided by NetXD Sample value: "credential" |
payload Mandatory | Object |
accountNumber Mandatory | String Account number for which the status is to be updated Sample value: "200238325468489" |
status Mandatory | Enum Status to be updated for the account Valid values: - ACTIVE: The account is open for all transactions. - DORMANT: Only inbound credit transactions are allowed. The account will automatically transition to Active when an inbound credit transaction occurs. - SUSPENDED: No transactions are allowed in this state. The account must be manually changed to Active, typically due to compliance issues. It can also be reactivated based on a court order. - CLOSED: The account is permanently closed, and no transactions are allowed. Once an account is in this state, it cannot be reactivated. Sample value: "DORMANT" |
- cURL
- C#
- Go
- NodeJS
curl --location --globoff '{{URL}}/jsonrpc' \
--header 'Content-Type: application/json' \
--data '{"method":"AccountService.UpdateAccountStatus","id":"1","params":{"api":{"signature":"{{signature}}","keyId":"{{ApplicationKeyId}}","credential":"{{credential}}"},"payload":{"accountNumber":"200238325468489","Status":"DORMANT"}}}'
var options = new RestClientOptions("{{URL}}/jsonrpc")
{
MaxTimeout = -1,
};
var client = new RestClient(options);
var request = new RestRequest("", Method.Post);
request.AddHeader("Content-Type", "application/json");
var body = @"{
" + "\n" +
@" ""method"": ""AccountService.UpdateAccountStatus"",
" + "\n" +
@" ""id"": ""1"",
" + "\n" +
@" ""params"": {
" + "\n" +
@" ""api"": {
" + "\n" +
@" ""signature"": ""{{signature}}"",
" + "\n" +
@" ""keyId"": ""{{ApplicationKeyId}}"",
" + "\n" +
@" ""credential"": ""{{credential}}""
" + "\n" +
@" },
" + "\n" +
@" ""payload"": {
" + "\n" +
@" ""accountNumber"": ""200238325468489"",
" + "\n" +
@" ""Status"": ""DORMANT""
" + "\n" +
@" }
" + "\n" +
@" }
" + "\n" +
@"}";
request.AddStringBody(body, DataFormat.Json);
RestResponse response = await client.ExecuteAsync(request);
Console.WriteLine(response.Content);
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "{{URL}}/jsonrpc"
method := "POST"
payload := strings.NewReader(`{`+"
"+`
"method": "AccountService.UpdateAccountStatus",`+"
"+`
"id": "1",`+"
"+`
"params": {`+"
"+`
"api": {`+"
"+`
"signature": "{{signature}}",`+"
"+`
"keyId": "{{ApplicationKeyId}}",`+"
"+`
"credential": "{{credential}}"`+"
"+`
},`+"
"+`
"payload": {`+"
"+`
"accountNumber": "200238325468489",`+"
"+`
"Status": "DORMANT"`+"
"+`
}`+"
"+`
}`+"
"+`
}`)
client := &http.Client {
}
req, err := http.NewRequest(method, url, payload)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("Content-Type", "application/json")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := ioutil.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "{{URL}}/jsonrpc"
method := "POST"
payload := strings.NewReader(`{`+"
"+`
"method": "AccountService.UpdateAccountStatus",`+"
"+`
"id": "1",`+"
"+`
"params": {`+"
"+`
"api": {`+"
"+`
"signature": "{{signature}}",`+"
"+`
"keyId": "{{ApplicationKeyId}}",`+"
"+`
"credential": "{{credential}}"`+"
"+`
},`+"
"+`
"payload": {`+"
"+`
"accountNumber": "200238325468489",`+"
"+`
"Status": "DORMANT"`+"
"+`
}`+"
"+`
}`+"
"+`
}`)
client := &http.Client {
}
req, err := http.NewRequest(method, url, payload)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("Content-Type", "application/json")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := ioutil.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}
Body
{
"method": "AccountService.UpdateAccountStatus",
"id": "1",
"params": {
"api": {
"signature": "{{signature}}",
"keyId": "{{ApplicationKeyId}}",
"credential": "{{credential}}"
},
"payload": {
"accountNumber": "200238325468489",
"Status": "DORMANT"
}
}
}
Response: 200
Payload Parameters
Parameter | Description |
---|---|
id | String Response ID echoed from the request ID Sample value: "1" |
result | Object Container for account result details |
result.CustomerId | String Unique ID of the customer associated with the account Sample value: "100000000001002" |
result.AccountNumber | String Account number for which the status is updated Sample value: "200238325468489" |
result.InstitutionId | String Routing number of the bank or financial institution associated with the account Sample value: "101115315" |
result.Name | String Name of the account Sample value: "General Account" |
result.Status | Enum Updated status of the account Valid values: - ACTIVE: The account is open for all transactions. - DORMANT: Only inbound credit transactions are allowed. The account will automatically transition to Active when an inbound credit transaction occurs. - SUSPENDED: No transactions are allowed in this state. The account must be manually changed to Active, typically due to compliance issues. It can also be reactivated based on a court order. - CLOSED: The account is permanently closed, and no transactions are allowed. Once an account is in this state, it cannot be reactivated. Sample value: "DORMANT" |
{
"id": "1",
"result": {
"CustomerId": "100000000001002",
"AccountNumber": "200238325468489",
"InstitutionId": "101115315",
"Name": "General Account",
"Status": "DORMANT"
}
}